#ifndef GAMEENGINE_GAMEPLAY_OBJECTS_OBJECT_INVENTORY_H
#define GAMEENGINE_GAMEPLAY_OBJECTS_OBJECT_INVENTORY_H

#include <GameEngine/Gameplay/gameplay_settings.h>

#include <GameEngine/Gameplay/Objects/object.h>
#include <GameEngine/Core/Classes/rtti.h>

#include <QtGui/QImage>


#ifdef GAMEENGINE_NAMESPACES
namespace GameEngine {
#endif

class ObjectContainer;

//=================================================================================


//! An inventory object
/*!
 *  Inventory objects are objects that can be stored in a container. See the
 *  ObjectContainer class documentation for more informations on the mechanisms of
 *  adding/removing objects to/from a container
 */
class _Gameplay_decl ObjectInventory : public Object {
	GAMEENGINE_DECLARE_RTTI_PARENT(ObjectInventory,Object)
	Q_OBJECT

public:
	ObjectInventory();
	ObjectInventory(const ObjectInventory& rhs);
	ObjectInventory& operator=(const ObjectInventory& rhs);
	virtual ~ObjectInventory();

	int weight() const;
	void set_weight(int weight);

	const GEString& description() const;
	void set_description(const GEString& description);

	const QImage& icon() const;
	void set_icon(const QImage& icon);

	ObjectContainer* container() const;
	void set_container(ObjectContainer* container, bool notify_container=true);

signals:
	//! Signal emitted when the weight of the object changes
	void weight_changed() const;
	//! Signal emitted when the description of the object changes
	void description_changed() const;
	//! Signal emitted when the icon of the object changes
	void icon_changed() const;
	//! Signal emitted when the container of the object changes
	void container_changed() const;

protected:
	//! Weight of the inventory object
	int weight_;

	//! Description of the inventory object
	GEString description_;

	//! Icon associated to the the inventory object
	QImage icon_;

	//! ObjectContainer of the object, if any
	ObjectContainer* container_;
};

//========================================================

#ifdef GAMEENGINE_NAMESPACES
} // namespace GameEngine
#endif

#endif
